home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000007_icon-group-sender _Fri Jan 5 20:26:00 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  3KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 8 Jan 1996 06:09:30 MST
  2. Message-Id: <m0tYOL4-001I07C@ns1.computek.net>
  3. Date: Fri, 5 Jan 96 20:26 CST
  4. Mime-Version: 1.0
  5. Content-Type: text/plain
  6. Content-Transfer-Encoding: 7bit
  7. From: gep2@computek.net
  8. Subject: Re: How does Icon compare to Perl?
  9. To: icon-group@cs.arizona.edu
  10. X-Mailer: SPRY Mail Version: 04.00.06.17
  11. Errors-To: icon-group-errors@cs.arizona.edu
  12. Status: O
  13.  
  14. >I've looked over Perl and it seems like what I'd expect from
  15. an early cut at Icon (i.e. V1.0). 
  16.  
  17. Actually, a year or two ago I took a Perl program that a French friend was 
  18. really thrilled with (so easy, so compact, etc. etc.) and rewrote it in SNOBOL4+ 
  19. with very little effort... and my SNOBOL4+ version was about half the size of 
  20. his original Perl program.
  21.  
  22. My general feeling is that Perl would be a wonderful tool, if SNOBOL4 and Icon 
  23. didn't exist.  But they DO exist, so why put up with a halfassed dog like Perl?
  24.  
  25. >It has regular expression pattern matching which some deem extremely cool. 
  26.  
  27. How so?  RegExs are really pitiful compared to a real SNOBOL4-style pattern 
  28. match or an Icon-style string scanning expression.  Who needs a "poor man's" 
  29. pattern match, when you can have the real thing?
  30.  
  31. >Perl is interpreted like old BASIC is interpreted. Each line has
  32. to be freshly loaded and parsed during execution, whereas, even
  33. an "interpreted" Icon program uses a pre-digested icode. Perl
  34. programmers claim this is their plus, they can edit-run-edit-run
  35. where Icon programmers have to edit-compile-run-edit-compile-run.
  36.  
  37. In the case of SNOBOL4 you compile-and-run in a single step, and compilation 
  38. time (even moreso than for Icon) is generally essentially trivial.  Although you 
  39. CAN pre-compile your programs if you want, which can be useful if you want to 
  40. sell your programs and don't want to distribute them in source form.
  41.  
  42. >I think it's possible to write Perl code that looks like Icon and
  43. maybe even to write Icon that looks like Perl (I don't why).
  44.  
  45. You certainly can't write anything so easily in Perl that handles the kinds of 
  46. multivalued expressions and goal-directed evaluation that you have in Icon!  I 
  47. don't see that Perl implements anything more than a very small and limited, 
  48. primitive subset of either SNOBOL4 or Icon.  Honestly, if you have and know 
  49. either or both of Icon or SNOBOL4, I don't see much (if any at all) point in 
  50. wasting time on Perl too.
  51.  
  52. Gordon Peterson
  53. http://www.computek.net/public/gep2/
  54.  
  55.